//
// Created by de on 3/30/21.
//

#ifndef FORCEEIGENTEST_CSEMAPHORE_H
#define FORCEEIGENTEST_CSEMAPHORE_H

#include <condition_variable>
#include "memory"
#include "mutex"

class CSemaphore {

public:
    CSemaphore();

    void signal();

    void wait();


private:
    std::mutex _mutex;
    std::condition_variable _cv;
//    std::atomic<int>  m_count;
    long m_count;
};


#endif //FORCEEIGENTEST_CSEMAPHORE_H
